'use strict';
const uniID = require('uni-id-common')
const ASE= require('ase')
exports.main = async (event, context) => {
	const uniIDIns = uniID.createInstance({
		context: context,
	})
	const res = await uniIDIns.checkToken(event.uniIdToken)
	const db = uniCloud.databaseForJQL({
			event,
			context 
		});
	event=JSON.parse(ASE.AES.decrypt(event.data,'yclycl1314520520','9740022097400220'))
	await db.collection("uni-id-users").where({_id:res.uid}).update(event.form);
	return {msg:"修改成功"}
};
